package no.hib.bridge.beans;

import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;

public class LinkBean {
	private String address;
	private String name;
	private String location;
	private String section;

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getLocation() {
		return location;
	}

	public void setLocation(String location) {
		this.location = location;
	}

	public String getSection() {
		return section;
	}

	public void setSection(String section) {
		this.section = section;
	}

	public InputStream getInputStream() throws UnsupportedEncodingException{
		String s = "";
		s += "address=" + address;
		s += "&name=" + name;
		s += "&location=" + location;
		s += "&section=" + section;
		InputStream is = new ByteArrayInputStream(s.getBytes("UTF-8"));
		return is;
	}
}
